package com.dalin.platform.loa.condition;

import com.dalin.common.pager.Condition;

/*****************************************************************************
 * @content: LoaMenu相关查询                                                                                                                *
 * @author : 那建林                                                                                                                                 *
 * @crtDate: 2010-05-16                                                     *
 ****************************************************************************/
public class MenuCondition extends Condition {
	private Long projectId;
	private Long parentId;
	private Integer valid = 1; // 默认查有效值

	public MenuCondition prepareParams() {
		setBaseQueryStr("from LoaMenuEntity h");
		setParam("h.projectId", "=", projectId);
		setParam("h.parentId", "=", parentId);
		setParam("h.valid", "=", valid);
		setOrderBy("h.sequence asc");
		return this;
	}
	
	
	
	public Long getParentId() {
		return parentId;
	}
	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
	public Long getProjectId() {
		return projectId;
	}
	public void setProjectId(Long projectId) {
		this.projectId = projectId;
	}
	public Integer getValid() {
		return valid;
	}
	public void setValid(Integer valid) {
		this.valid = valid;
	}
}
